package cn.tedu._04mybatis.mapper;

import cn.tedu._04mybatis.pojo.entiry.Weibo;
import cn.tedu._04mybatis.pojo.vo.*;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface WeiboMapper {
  //  @Insert(value = "insert into weibo (content,created,user_id) values (#{content},#{created},#{user_id})" )
    int insertWeibo(Weibo weibo);
    //@Delete(value ="DELETE FROM weibo where id = #{wid}")
    int deleteWeiboById(Long wid);
//    @Update(value = "update weibo set content=#{content},created=#{created},user_id=#{user_id} where id=#{id}")
    int updateWeiboById(Weibo weibo);
  //  @Select(value = "select id,content,created,user_id from weibo WHERE id=#{wid}")
    Weibo selectWeiboByid(Long wid);
    //@Select(value = "select content,created from weibo where id=#{wid} ")
    WeiboVO1 selectWeiboVO1Byid(Long wid);
    //@Select(value = "select content,id wid from weibo where user_id=#{uid} ")
    List<WeiboVO2> selectWeiboVO2Byid(Long uid);
    int deleteWeiboByIds1(Integer[] ids);
    int deleteWeiboById2(List<Integer> ids);
    int dynamicUpdateWeiboById(Weibo weibo);
    int selectCount();
    ResultMapVO1 selectMap1(Long wid);
    ResultMapVO2 selectMap2(Long uid);
    ResultMapVO3 selectMap3(Long wid);

}
